package com.gzhuxj201.service.Impl;

import com.gzhuxj201.entity.Admin;
import com.gzhuxj201.mapper.AdminMapper;
import com.gzhuxj201.service.AdminSevice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminSeviceImpl implements AdminSevice {

    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Admin login(String username, String password) {
        return adminMapper.selectByUsernameAndPassword(username,password);
    }

    @Override
    public Admin selectByUsername(String username) {
        return adminMapper.selectByUsername(username);
    }

    @Override
    public int update(Admin updateAdmin) {
        return adminMapper.update(updateAdmin);
    }
}
